<template>
  <div class="feed">
    <header class="header">
      <div class="title">猫乐美食，会做饭很酷~</div>
      <div>你关注人的动态都会出现在这</div>
      <div>为你推荐了一些有趣的人，快关注 TA 们吧</div>
    </header>
    <div class="content">
      <FeedItem v-for="(item,index) in feedList" :key="index" :item="item"/>
    </div>
  </div>
</template>

<script>
import FeedItem from "@/components/FeedItem.vue";
  export default {
    components:{
      FeedItem
    },
    data:()=>{
      return {
        offset:0,
        limit:20,
        feedList:[]
      }
    },
    methods:{
      getFeedList(){
        this.axios.get(`${this.api.baseUrlData}/douguo/home/ffeeds/${this.offset}/${this.limit}`).then((res) => {
          this.feedList = res.data.result.rfs;
        })
      }
    },
    created(){
      this.getFeedList();
    }
  }
</script>

<style lang="scss" scoped>
.feed{
  width: 100%;
  padding-bottom: 0.6rem;
  .header{
    color: #aaaaaa;
    font-size: 0.13rem;
    width: 100%;
    background-color: #fafafa;
    box-sizing: border-box;
    padding: 0.1rem;
    .title{
      color: #2d2d2d;
      font-size: 0.15rem;
      font-weight: bold;
      margin-bottom: 0.1rem;
    }
  }
}
</style>